< previous page page_633 next page >

Page 633
0633-01.jpg
Figure 17.27
Side view of two spheres and a partially reflective and transparent polygon.
Figure 17.27 shows program VBRay displaying two spheres and a polygon. The polygon is partially reflective and partially transparent, so it shows a reflected image of one sphere and a transmitted image of the other. Figure 17.28 shows the same objects from above so that you can see their relationship.
Figure 17.29 shows program VBRay displaying a transparent sphere in front of two other spheres and a polygon.
The previous code works well for closed objects like the sphere shown in Figure 17.29. Flat objects such as polygons and disks, however, can be used in one of two ways. First, you may want to use the object as if it were a thin piece of glass or metal. This is the way the earlier sections in this chapter use these objects.
A light ray passing through a thin piece of glass is bent as it enters the glass, and then it is bent by an opposite amount as it leaves the glass a short while later. The images of objects behind the glass are shifted slightly, but they are not distorted. You can make a disk or polygon object ignore the minor shift in the transmitted light rays by setting the
0633-02.jpg
Figure 17.28
Top view of two spheres and a partially reflective and transparent polygon.

 
< previous page page_633 next page >